#pragma once
#include "Syntax/Kind.hpp"
#include "Syntax/Token.hpp"
#include "Syntax/Expression/Expression.hpp"
#include "Syntax/Statement/Statement.hpp"

class VariableDeclarationSyntax : public StatementSyntax
{
public:
    SharedToken Keyword;
    SharedToken Identifier;
    SharedToken EqualsToken;
    SharedExpression Initializer;

public:
    VariableDeclarationSyntax(SharedToken keyword, SharedToken identifier, SharedToken equalsToken, SharedExpression initializer)
        : StatementSyntax(SyntaxKind::VariableDeclaration, "VariableDeclaration"),
          Keyword(keyword), Identifier(identifier), EqualsToken(equalsToken), Initializer(initializer)
    {
    }
    ~VariableDeclarationSyntax() = default;
};

// 定义类型;
typedef std::shared_ptr<VariableDeclarationSyntax> SharedVariableDeclaration;